
<!DOCTYPE html>
<html lang="en"
<head>
    <meta charset="utf8"
    <title></title>
    <link rel="stylesheet" href="/back/css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="/back/css/bootstrap.min.css">
    <link href="http://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<style>
    .th{
        width:150px;
        font-family: 宋体;
        text-align: center;
    }

    .th1{
        width:200px;
        font-family: 宋体;
        text-align: center;
    }
    .th2{
        width:300px;
        font-family: 宋体;
        text-align: center;
    }
    .img-thumbnail{
        width:100px;
        height:100px;
    }
    .glyphicon glyphicon-pencil  .glyphicon glyphicon-trash{
        top: 1px;
        display: inline-block;
    }
    .input-group{
        float:right;
        padding-left: 150px;
        padding-top: 0px;
    }
    .btn-primary{
        float:left;
        margin-left: 50px;
    }
    .th3{
        width:60px;
        font-family: 宋体;
        text-align: center;
    }
    .table-bordered td,.table-bordered th{
        border:2px solid #5bc0de!important
    }
</style>
<body>
<div class="container">


    <div class="page-header">
        <p>

        <div class="row">
            <a href="/back/cartoon/list.php">
                <button type="button" class="btn btn-primary" >返回首页</button>
            </a>

            </div>

        </p>

        <table  class="table table-bordered">
            <thead>
            <tr>

                <th class="th">作品ID</th>
                <th class="th">漫画名称</th>
                <th class="th">漫画类型</th>
                <th class="th1">漫画封面</th>
                <th class="th1">漫画作者</th>
                <th class="th2">作品简介</th>
                <th class="th1">漫画状态</th>
                <th class="th3">操作</th>
            </tr>
            </thead>
            <tbody>
            <?php

            if(empty($_POST["cname"])){
                die("作品名不能为空");
            }
            $name=$_POST["cname"];
            $sql="select production.id as id,production.name as name,
type.name as ctype,production.coverPic as picture,production.author as author,
 production.introduction as introduction,production.state as state 
 from production inner join type on production.typeId=type.id  where production.name like '%$name%'";
//            echo $sql;
            include dirname(__FILE__) .'../../common/conn.php';
            $res=mysqli_query($con,$sql);
            mysqli_close($con);

            if($res) {
                while ($row = mysqli_fetch_array($res)) {
                    ?>
                    <tr>
                        <td class="th"><?php  echo $row["id"]?></td>
                        <td class="th"><?php  echo $row["name"]?></td>
                        <td class="th"><?php  echo $row["ctype"]?></td>
                        <td class="th1"><img align="middle" class="img-thumbnail" src="<?php  echo $row["picture"]?>"></td>
                        <td class="th"><?php  echo $row["author"]?></td>
                        <td class><?php  echo $row["introduction"]?></td>
                        <td class="th"><?php  echo $row["state"]?></td>
                        <td>

                            <a href="/back/cartoon/cartoonEdit.php?id=<?php echo $row["id"] ?>">
                                <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>
                            </a>
                            <a href="/back/cartoon/cartoonDelete.php?id=<?php echo $row["id"] ?>" onClick="return confirm('确定删除?');">
                                <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                            </a>

                        </td>
                    </tr>
                    <?php
                }
            }

            ?>
            </tbody>
        </table>

    </div>

</div>
</body>
</html>





